/*
 * @Author        : wang chao
 * @Date          : 2023-11-15 19:26:11
 * @LastEditors: wangchao
 * @LastEditTime: 2024-10-08 07:58:32
 * @FilePath: \JD-RTT-Driver\applications\u_params.h
 * @Description   :
 * @Copyright     : Copyright 2023 wang chao, All Rights Reserved.
 */
#ifndef _U_PARAMS_H_
#define _U_PARAMS_H_

#include <rtdevice.h>
#include <rtthread.h>
#include "board.h"

#define FUNC_PARAMS_BASE_ADDR 0x00
#define FUNC_PARAMS_LENGTH    200
#define NEW_BOARD_BYTE_FALG   0x14
#define NET_ADDR_BASE_ADDR    0x550
#define NET_ADDR_LENGTH       12

//
rt_int16_t get_func_params_from_eeprom(rt_uint16_t index);
rt_int16_t get_func_params_from_ram(rt_uint16_t index);
void set_func_params(rt_uint16_t index, rt_int16_t value);
//
void reset_default_params(void);
void system_func_params_init(void);
//
rt_int16_t get_alarm_params(rt_uint16_t index);
void set_alarm_params(rt_uint16_t index, rt_int16_t value);
rt_int16_t get_fault_params(rt_uint16_t index);
void set_fault_params(rt_uint16_t index, rt_int16_t value);
rt_int16_t get_app_params(rt_uint16_t index);
void set_app_params(rt_uint16_t index, rt_int16_t value);

#endif
